# coding=utf-8
from PO.BasePage import Base
from PO.DiscoverPage import DiscoverPage
import time


# 在行我的页面
class MyPage(Base):
    # 定位器
    title_loc = ('id', "com.guokr.mentor:id/text_view_title")
    appoint_loc = ('id', "com.guokr.mentor:id/text_view_tutors_list")
    wish_loc = ('id', "com.guokr.mentor:id/relative_layout_wish_list")
    gift_loc = ('id', "com.guokr.mentor:id/relative_layout_user_coupon_list")
    help_loc = ('id', "com.guokr.mentor:id/relative_layout_help")
    page_loc = ('id','com.guokr.mentor:id/image_view_personal_center_bg')

    # Action
    def title(self):
        """标题"""
        return self.find_element(self.title_loc).text

    def choose(self):
        """选择我的"""
        self.find_element(self.page_loc).click()

    def appoint(self):
        """我约的行家"""
        self.find_element(self.appoint_loc)

    def wish(self):
        """我的心愿单"""
        self.find_element(self.wish_loc)

    def gift(self):
        """我的礼券"""
        self.find_element(self.gift_loc)

    def helping(self):
        """帮助"""
        self.find_element(self.help_loc)
